package org.come.Jpanel;

import java.awt.CardLayout;
import java.awt.Dimension;
import java.math.BigDecimal;
import java.util.Map;

import javax.swing.JPanel;

import org.come.bean.ConfigureBean;
import org.come.model.Configure;
import org.come.until.UserMessUntil;

import com.updateNew.MyIsif;

public class WorkshopRefiningCardJpanel extends JPanel {

    private CardLayout car;
    private RefiningEquiJpanel equiJpanel;
    private RefiningEquiJpanel2 equiJpanel2;

    public RefiningEquiJpanel2 getEquiJpanel2() {
        return equiJpanel2;
    }

    public void setEquiJpanel2(RefiningEquiJpanel2 equiJpanel2) {
        this.equiJpanel2 = equiJpanel2;
    }

    private RefinersJpanel refinersJpanel;
    private SetsynthesisJpanel setsynthesisJpanel;
    private GemRefineryMainJpanel gemRefineryMainJpanel;

    public WorkshopRefiningCardJpanel() {
    	ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
    	Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
    	Configure configure = item.get(new BigDecimal(1));

        car = new CardLayout();
        	this.setPreferredSize(new Dimension(558, 516));
        this.setLayout(car);
        this.setOpaque(false);
        equiJpanel = new RefiningEquiJpanel();
        equiJpanel2 = new RefiningEquiJpanel2();
        this.add(equiJpanel, "l1");
        this.add(equiJpanel2, "l2");
        if(!"3".equals(configure.getLzjskg())) {
        	refinersJpanel = new RefinersJpanel();
        	this.add(refinersJpanel, "l3");
        	setsynthesisJpanel = new SetsynthesisJpanel();
        	this.add(setsynthesisJpanel, "l4");
        	if("开".equals(configure.getBsqhkg())) {
        		gemRefineryMainJpanel = new GemRefineryMainJpanel();
        		this.add(gemRefineryMainJpanel, "l5");
        	}
        }
    }

    public CardLayout getCar() {
        return car;
    }

    public void setCar(CardLayout car) {
        this.car = car;
    }

    public RefinersJpanel getRefinersJpanel() {
        return refinersJpanel;
    }

    public void setRefinersJpanel(RefinersJpanel refinersJpanel) {
        this.refinersJpanel = refinersJpanel;
    }

    public SetsynthesisJpanel getSetsynthesisJpanel() {
        return setsynthesisJpanel;
    }

    public void setSetsynthesisJpanel(SetsynthesisJpanel setsynthesisJpanel) {
        this.setsynthesisJpanel = setsynthesisJpanel;
    }

    public RefiningEquiJpanel getEquiJpanel() {
        return equiJpanel;
    }

    public void setEquiJpanel(RefiningEquiJpanel equiJpanel) {
        this.equiJpanel = equiJpanel;
    }

    public GemRefineryMainJpanel getGemRefineryMainJpanel() {
        return gemRefineryMainJpanel;
    }

    public void setGemRefineryMainJpanel(GemRefineryMainJpanel gemRefineryMainJpanel) {
        this.gemRefineryMainJpanel = gemRefineryMainJpanel;
    }

}
